<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of DetailController
 *
 * @author tuanbao
 */
class DetailController extends FrontController
{
    public function actionIndex()
    {
        $cri = new CDbCriteria();
        $cri->condition = 'sid =:u';
        $cri->params = array(
            ':u' => $_GET['service']
        );
        $service = Service::model()->find($cri);
        
         if (!$service)
            throw new CHttpException(404, Yii::t('frontend','The requested page does not exist.'));

        if ($service === null)
            throw new CHttpException(400, Yii::t('frontend', 'Your request is invalid.'));
        
        $this->render('index', array(
            'detail_sv'=>$service,
        ));
    }
}

